import { get, post } from '@/utils/request.js'
import api from '@/config/index.js'

export default {
  /**
   * 获取Invoice Number Year
   * @returns {Promise | Promise<unknown>}
   */
  getInvoiceNumberYear() {
    return get(api.API_VERSION + '/Others/Statistics/InvoiceNumber/GetYears', {}, false)
  },
  /**
   * 获取Invoice Number Month
   * @returns {Promise<unknown>}
   */
  getInvoiceNumberMonth() {
    return get(api.API_VERSION + '/Others/Statistics/InvoiceNumber/GetMonths', {}, false)
  },
  /**
   * 获取Invoice Number下Personnel列表
   * @param data
   * @returns {Promise<unknown>}
   */
  getAdminInvoiceNumberPersonnel(data) {
    return post(api.API_VERSION + '/Admin/Others/BUStatistics/InvoiceNumber/InvoiceListByPersonnel', data, false)
  },
  /**
   * 获取Invoice Number下Personnel&Client列表
   * @param data
   * @returns {Promise<unknown>}
   */
  getAdminInvoiceNumberPersonnelClient(data) {
    return post(api.API_VERSION + '/Admin/Others/BUStatistics/InvoiceNumber/InvoiceListByClientPersonnel', data, false)
  },
  /**
   * 获取Purchase Order下PO列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPurchaseOrderPOList(data) {
    return post(api.API_VERSION + '/Admin/Others/BUStatistics/PurchaseOrder/PurchaseOrderList', data, false)
  },
  /**
   * 获取Purchase Order下Sales Personnel列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPurchaseOrderPersonnelList(data) {
    return post(api.API_VERSION + '/Admin/Others/BUStatistics/PurchaseOrder/PurchaseOrderListByPersonnal', data, false)
  }
}
